FROM php:8.2-fpm

RUN touch /etc/apt/sources.list.d/debian.sources

RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources
RUN apt-get update
RUN apt-get install -y git

ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/

RUN install-php-extensions @composer pdo_mysql zip-1.22.3 redis-6.0.2 mcrypt-1.0.7 xdebug-3.3.1 intl pcntl bcmath sockets

CMD ["php-fpm"]

RUN apt-get clean && rm -rf /var/lib/apt/lists/*

EXPOSE 9000